<script>
    $(document).ready(function(){
            $(".fancybox_popin").fancybox({
                    autoSize : false,
                    width : 860,
                    height : 'auto',
                    type : 'ajax',
                    afterClose: function(){ window.location = $("#this_url").attr('value') ;}
                    });
    });
</script>

<p>Welcome <?php echo $this->user->getFirstname().' '.$this->user->getName() ?>.</p>
<p>This is your own page on this web site !</p>
<p>Congratulations !</p>
<br/>
<p>
    You can edit this page creating some comments belong. To do it, just click here : 
    <a class="fancybox_popin" title="Add a comment" href="<?php echo $this->url( array('controller'=>'user','action'=>'addcomment'),'default',true) ?>">Add a comment</a>.
</p>
<input type="hidden" id="user_id" value="<?php echo $this->user->getId() ?>">
<input type="hidden" id="this_url" value="<?php echo $this->url( array('controller'=>'user','action'=>'logged','id'=>$this->user->getId()),'default',true) ?>">
<br/>

List of your comments : <br />
<dl>
    <?php foreach ($this->comments as $comment): ?>
    <dt><?php echo $this->escape($comment->title) ?> <a title="Delete comment" href="<?php echo $this->url( array('controller'=>'user','action'=>'deletecomment','id'=>$comment->id),'default',true) ?>">Delete</a></dt>
    <dd><?php echo $this->escape($comment->content) ?></dd>
    <?php endforeach ?>
</dl>
<br/>

<p><a class="fancybox_popin" title="Edit" href="<?php echo $this->url( array('controller'=>'user','action'=>'edit'),'default',true) ?>">Edit</a></p>
<br/>

<p><a title="Logout" href="<?php echo $this->url( array('controller'=>'user','action'=>'logout'),'default',true) ?>">Logout</a></p>
<br/>

<p>You can unsubscribe from this web site clicking here : 
    <a title="Unsubscripe" href="<?php echo $this->url( array('controller'=>'user','action'=>'unsubscribe','id'=>$this->user->getId()),'default',true) ?>">Unsubscribe</a>
</p>

<p><a title="User space" href="<?php echo $this->url(array('controller' => 'user','action'=>'index'),'default',true) ?>">Go back to the user space</a></p>

<p><a title="Home" href="<?php echo $this->url(array('controller'=>'index','action'=>'index'),'default',true) ?>">Go back to home page</a></p>
